package cn.lopr.hfbdqn.route;

import cn.lopr.hfbdqn.common.Result;
import cn.lopr.hfbdqn.pojo.User;
import cn.lopr.mvc.frame.annotaion.Param;
import cn.lopr.mvc.frame.annotaion.RequestBody;
import cn.lopr.mvc.frame.annotaion.Route;

/**
 * @author shuangyang7
 * @date 2021/7/19 11:24
 */
@Route("/user")
public interface UserRoute {
    Result<?> getAll();

    Result<?> updById(@Param(paramName = "id") String id);

    Result<?> delById(@Param(paramName = "id") String id);

    /**
     * http://localhost:8080/movie-api/user/login.do?username=s&password=1
     *
     * @param username 用户名
     * @param password 密码
     */
    Result<?> login(@Param(paramName = "username") String username,
                    @Param(paramName = "password") String password);

    Result<?> getUserInfo();


    Result<?> logout();

    @RequestBody
    Result<?> requestBodyTest(User user);
}
